PATH
WebObjects 4.5 Documentation >
Creating a Java Client Application: A Tutorial
Putting the Finishing Touches on Your Model
You are almost ready to add custom behavior to your enterprise objects. But first you need to put a few finishing touches on your model.
In
Adding Relationships
, you added relationships between the Studio and Movie entities. Now you need to verify or add a few additional relationships to your model. You might find that the relationship already exists, but just the name needs to be changed:
From the Movie (source) entity:
-
Form a to-many relationship to the MovieRole (destination) entity.
-
The source attribute is movieID. The destination attribute is movieID.
-
Name the relationship roles.
-
Form a to-one relationship to the PlotSummary (destination) entity.
-
The source attribute is movieID. The destination attribute is movieID.
-
Name the relationship plotSummary.
From the Talent (source) entity:
-
Form a to-many relationship to the MovieRole (destination) entity.
-
The source attribute is talentID. The destination attribute is talentID.
-
Name the relationship roles.
-
Form a to-one relationship to the TalentPhoto (destination) entity.
-
The source attribute is talentID. The destination attribute is talentID.
-
Name the relationship photo.
From the MovieRole (source) entity:
-
Form a to-one relationship to the Movie (destination) entity.
-
The source attribute is movieID. The destination attribute is movieID.
-
Name the relationship movie.
-
Form a to-one relationship to the Talent (destination) entity.
-
The source attribute is talentID. The destination attribute is talentID.
-
Name the relationship talent.
At this point your model is complete. There might be other relationships in your model, but the above relationships are the most important for our example project. Looking at your model using the Diagram View (select the model icon and choose Tools
Diagram View) gives you an overview of the entities in the model and their relationships to other entities.
© 1999 Apple Computer, Inc. – (Last Updated 13 Sep 99)